﻿using Microsoft.Extensions.DependencyInjection;
using System;

namespace Cngot.Extensions.DependencyInjection
{
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
    public class DependencyInjectionAttribute : Attribute
    {
        public Type ServiceType { get; }
        public ServiceLifetime Lifetime { get; }
        public string Instance { get; }
        public DependencyInjectionAttribute(Type serviceType, ServiceLifetime lifetime, string instance = null)
        {
            ServiceType = serviceType;
            Lifetime = lifetime;
            Instance = instance;
        }
    }
}
